import { Routes, RouterModule } from '@angular/router';
import { ModuleWithProviders } from "@angular/core";

import { UserRegisterComponent } from "./user/user-register/user-register.component";
import { UserLoginComponent } from "./user/user-login/user-login.component";
import { HomeComponent } from "./content/home/home.component";

export const appRoutes: Routes = [
    {
        path: '',
        redirectTo: '/login',
        pathMatch: 'full'
    },
    {
        path: '**',
        redirectTo: '/login',
        pathMatch: 'full'
    },
    {
        path: 'home',
        component: HomeComponent
    },
    {
        path: 'login',
        component: UserLoginComponent
    },
    {
        path: 'register',
        component: UserRegisterComponent
    }
];

export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes)